<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-cn">
<title>购物车</title>
<meta name="description" content="">  
<meta name="keywords" content="">
<!--<link rel="shortcut icon" href="http://www.vmall.com/favicon.ico">-->
<link href="./Public/Home/css/ec.css" rel="stylesheet" type="text/css">
<link href="./Public/Home/css/cart.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./Public/hdjs/hdjs.css"/>
<script src="./Public/Common/jquery-1.9.1.min.js" type="text/javascript"></script>
<!--[if lt IE 9]><script src="http://res9.vmallres.com/20160712/js/common/html5shiv.js"></script> <![endif]-->
<script src="./Public/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./Public/Home/js/area.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
	#motaiAddress{
		
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0px;
		left: 0px;
		background: rgba(0,0,0,0.8);
		z-index: 1000;
		display: none;
		
	}
	
	#motaiAddress .main{
		
		position: absolute;
		left: 50%;
		top: 50%;
		margin-left: -250px;
		margin-top: -200px;
		width: 450px;
		background: whitesmoke;
		padding: 50px;
	}
	
	#motaiAddress .main .close{
		
		position: absolute;
		top: 15px;
		left: 480px;
		cursor: pointer;
	}
	
	.addAddressform{
		
		margin-top: 40px;
		
	}
	
	.form_group{
		margin-bottom: 20px;
	}
	
	.form_group label{
		display: inline-block;
		width: 80px;
		font-size: 14px;
		color: #8c8c8c;
	}
	
	.form_group input{
		border: 1px solid silver;
		width: 350px;
		height: 35px;
	}
	
	.form_group select{
		border: 1px solid silver;
		width: 100px;
		height: 35px;
	}
	
	
	.form_group button.success{
		border: 0px;
		border-radius: 5px;
		background-color:  #5cb85c;
		color: white;
		width: 100px;
		padding: 5px;
		
	}
	
	
	.form_group button.rest{
		border: 0px;
		border-radius: 5px;
		background-color:  #d9534f;
		color: white;
		width: 100px;
		padding: 5px;
		
	}
	
	
	
</style>


</head>


<body class="wide sc">
<div class="top-banner" id="top-banner-block"></div>
<div class="shortcut">
    <div class="layout">
		<div class="s-sub">
			<ul>
				<li class="s-hw"><a href="index.php">返回商城</a></li>
			</ul>
		</div>
		<div class="s-main">
						<ul>
			    <?php if(isset($_SESSION['info'])){?>
                
			    	
				    <li class="s-login" id="unlogin_status">
						<a href=""><?php echo $_SESSION['info']['username']?></a>
						<a href="<?php echo U('User/out')?>">退出</a>
					</li>
				
				<?php }else{?>
                   
                    <li class="s-login" id="unlogin_status">
						<a href="<?php echo U('User/login')?>">登录</a>
						&nbsp;&nbsp;&nbsp;
                        <a href="<?php echo U('User/reg')?>">注册</a>
				    </li>
				
               <?php }?>
				<li class="s-myOrders">
					<a href="<?php echo U('Order/index')?>" rel="nofollow" timetype="timestamp">个人中心</a>
				</li>
				<li class="s-hwep hide" id="preferential"></li>
			</ul>
		</div>
		<!--顶部session判断登录结束-->
    </div>
</div>
<!--头部 -->
<div class="order-header">
	<div class="g">
    	<div class="fl">
            <div class="logo logo-index"><a href="" title="华为商城"><img src="./Public/Home/image/newLogo.png" alt="华为商城"></a></div>
       </div>
        <div class="fr">
            <!--步骤条-三步骤 -->
            <div class="progress-area progress-area-3">
                <!--我的购物车 -->
                <div id="progress-cart" class="progress-sc-area hide">我的购物车</div>
                <!--核对订单 -->
                <div style="display: block;" id="progress-confirm" class="progress-co-area hide">填写核对订单信息</div>
                <!--成功提交订单 -->
                <div id="progress-submit" class="progress-sso-area hide">成功提交订单</div>
            </div>
        </div>
    </div>
</div>
<?php if(!empty($data)){?>
                
<div class="layout order">
	<!--栏目 -->

	<!--订单-表单 -->
	<!--收货人地址开始-->
	<div class="order-form-area">
    	<div class="order-address" id="order-address-mod">
    	
			<h3 class="title">收货人信息<b>[<a id="addAddress" href="javascript:;">使用新地址</a>]</b></h3>
			
			<div class="order-address-list" id="order-address-list" >
				<!--<ol>-->
					<li class="current" id="myAddress-29651555">
						
					</li>
				<!--</ol>-->
			</div>
         </div><!-- 20140813-订单-表单-地址-end -->
	</div>
	<!--收货人地址结束-->
	
	<div class="sc-area">
	<!--#### shopId改为shopCode <selfCartInfo.shopId==1>-->
	  <div class="dt-order-area">
		<!-- 20140630-自营商品订单-start -->
	    <div class="order-pro-list" id="order-pro-list">
			<!--购物车-商品列表-20121016 start-->
			<div class="order-pro-list">
				<!--订单-商品-标题 -->
				<div class="order-pro-title-area">
				    <div class="h">以下商品由&nbsp;&nbsp;<b>华为商城</b>&nbsp;&nbsp;选择合作快递配送</div>
					<div class="b">
						<table border="0" cellpadding="0" cellspacing="0">
							<thead>
								<tr>
									<th class="tr-pro">商品</th>
									<th class="tr-price">单价（元）</th>
									<th class="tr-quantity">数量</th>
									<th class="tr-subtotal">小计（元）</th>
								</tr>
							</thead>
						</table>
					</div>
				</div>
				<!--订单-商品-标题 -->

				
				<!--订单-商品-普通商品-->
				
				<?php foreach ($data as $v){?>
				<div class="order-pro-area">
					<table border="0" cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td class="tr-pro">
									<ul class="pro-area-2">
										<li>
										  <a title="<?php echo $v['name']?> 3GB+32GB版 全网通（玫瑰金）" target="_blank" href="<?php echo U('Goods/index',['gid'=>$v['options']['gid']])?>"><?php echo $v['name']?><?php foreach ($v['vdata'] as $vv){?> <?php echo $vv['gtvalue']?>  <?php }?></a>
										</li> 
									 </ul>
								 </td>
								<!-- 预付订金商品的价格为空 -->
								<td class="tr-price">¥<?php echo $v['price']?></td>
								<td class="tr-quantity"><?php echo $v['num']?></td>
								<td rowspan="1" class="tr-subtotal">
								<p class="tr_total" tr_total="<?php echo $v['total']?>"><b>¥<?php echo $v['total']?></b></p>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
                <?php }?>
				<!--订单-商品-普通商品 End-->
			</div><!--购物车-商品列表-20121016 end-->
		</div>
		<!--购物车-自营商品列表结束 -->
		<!-- 20140627-商品结算-start -->
		<div class="order-pro-total clearfix">
				 <div class="fr">
					<!-- 20140630-订单-金额-start -->
					<div class="order-cost-area">
						<table border="0" cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td class="tal">商品总金额：</td>
								<td class="tar">&nbsp;¥&nbsp;
								   <em id="order-cost-area">2799.00</em>
								</td>
						</tbody>
					</table>
						<p class="order-cost-total">
						  <span class="p-subtotal-price"> 应付金额：<b class="total">¥</b><b class="total" id="order-price">2799.00</b></span>
					    </p>
					</div><!-- 20140630-订单-金额-end -->
				</div>
		    </div>
		    <!-- 20140627-商品结算-end -->
			
		  </div>
		

	    	<!-- 提交订单start-->
			<div class="order-action-area tar">
				<!-- 20140630-订单-下单验证-start -->
				<div class="order-protect">
				</div>
				<!-- 20140630-订单-下单验证-end -->
				   <span class="p-subtotal-price">应付总额：<b>¥<span class="vab" id="payableTotal">2799.00</span></b></span>
				<a href="javascript:;" class="button-style-1 button-submit-order" title="提交订单"><span>提交订单</span></a>
			</div>
		  <!-- 提交订单end-->
	</div>
	
	<script type="text/javascript">
	    
	    var total=0;
		$.each($('.tr_total'), function(){
			total=total+parseInt($(this).attr('tr_total'));
		});
		
		$('#order-cost-area').text(total);
		$('#payableTotal').text(total);
		$('#order-price').text(total);
		
	</script>
</div>
<?php }else{?>

<div class="order-pro-area" style="text-align: center; font-size: 20px; margin-top: 20px;">
	您的订单为空，快请去购物吧！
</div>

               <?php }?>
<div class="hr-45"></div>

<div class="slogan">
	<ul>
		<li class="s1"><i></i>500强企业&nbsp;品质保证</li>
		<li class="s2"><i></i>7天退货&nbsp;15天换货</li>
		<!-- <li class="s3"><i></i>99元起免运费</li> -->
		<li class="s3"><i></i>
			<span>99元起免运费</span>
</li>
		<li class="s4"><i></i>448家维修网点&nbsp;全国联保</li>
	</ul>
</div>
<!--口号-end -->


<footer class="footer">
    <!-- 20130902-底部-友情链接-start -->
	<div class="footer-otherLink">
		<p style="text-align:left;">友情链接：  | 
			<a href="http://www.huawei.com/cn/" target="_blank">华为官网</a>  |
			
	</div>
	<div class="footer-warrant-area"><p><a textvalue="隐私政策" title="隐私政策" target="_blank" href="./Public/Home/image/20160226162651249.png" title="公安备案" border="0" height="20" hspace="0" vspace="0" width="20"><span style="font-size:15px;font-family:宋体"><span style="font-size:12px;font-family:arial,helvetica,sans-serif;"> 苏公网安备</span><span style="font-size:12px;font-family:arial,helvetica,sans-serif;"> 32011402010009号</span></span></a> | <a target="_blank" href="http://www.miitbeian.gov.cn/">苏ICP备09062682号-9</a> | 增值电信业务经营许可证：苏B2-20130048 | <a target="_blank" href="http://res.vmallres.com/certifi./Public/Home/image/wwwz.jpg">网络文化经营许可证：苏网文[2012]0401-019号</a></p><p><br><a target="_blank" href="http://res.vmallres.com/certifi./Public/Home/image/wwwz.jpg"></a></p><p><a target="_blank" href="http://www.jsgsj.gov.cn:60103/businessCheck/verifKey.do?serial=320100913201147770231720001001-SAIC_SHOW_32000020160129102316602&signData=MEUCIQDjstcg6fPylz+uES4LNTcBpBVlZujS8l5erIgXiDGw1QIgfHZFK11kZ1vB2enLCwvaslyfE1fztpB19AEK4hlwibo="><img src="./Public/Home/image/20160226162415360.png" style="float:none;width:90px;height:32px;" title="电子营业执照" border="0" height="32" hspace="0" vspace="0" width="90"></a>   <a target="_blank" href="https://ss.knet.cn/verifyseal.dll?sn=e13010932010038497pwz6000000&trustKey=dn&trustValue=vmall.com"><img style="width:90px;height:32px;float:none;" src="./Public/Home/image/20160226162521265.png" title="可信网站" border="0" height="32" hspace="0" vspace="0" width="90"></a>   <a target="_blank" href="https://search.szfw.org/cert/l/CX20121017001773002082"><img style="width:90px;height:32px;float:none;" src="./Public/Home/image/20160226162531395.png" title="诚信网站" border="0" height="32" hspace="0" vspace="0" width="90"></a></p></div><!--授权结束 -->
</footer>



<div id="motaiAddress">
	 <div class="main">
	 	<span class="close">关闭</span>
	 	<form id="form" class="addAddressform" action="javascript:;">
	 		<div class="form_group">
	 			<label for="consignee" >收货人：</label>
	 		    <input type="text" autocomplete="off"  class="form-control" name="consignee" id="consignee" value="" required="required"/>
	 		</div>
	 		
	 		<div class="form_group">
	 			<label for="address[]" >收货地址：</label>
	 			<select name="address[]" id="area1" required="required">
		
				</select>
				<select name="address[]" id="area2">
					
				</select>
				<select name="address[]" id="area3">
					
				</select>
	 		</div>
	 		
	 		<div class="form_group">
	 			<label for="address[]">详细地址</label>
	 			<input type="text" autocomplete="off" name="address[]" id="consignee" value="" required="required"/>
	 		</div>
	 		
	 		
	 		<div class="form_group">
	 			<label for="consignee" >联系电话：</label>
	 		    <input type="text" autocomplete="off"  class="form-control" name="mobile" id="consignee" value="" required="required"/>
	 		</div>
	 		
	 		
	 		<div class="form_group">
	 			<button class="success" type="submit">提交</button>
	 		    <button class="rest" type="reset">重置</button>
	 		</div>
	 	</form>
	 </div>						
</div>
			
			
			
			<script type="text/javascript">
				$(function(){
					$('#addAddress').click(function(){
						
						$('#motaiAddress').show();

					});
					
					$('.close').click(function(){
						
						$('#motaiAddress').hide();
					});
					
					//地区级联
					//初始化方法
					area.init('area');
					//修改的时候默认被选中效果
//					area.selected('请选择省','请选择市','请选择县');
				});
			</script>
			
			
			<script type="text/javascript">
				
				$(function(){
				    $('#form').submit(function(){
						var data=$(this).serialize();
						$.ajax({
							type:"post",
							url:"<?php echo U('Order/addressMake')?>",
							data:data,
							dataType:'json',
							success:function(data){
								var html= '<div class="address-main">';
								html+= '<span class="address-mark">寄送至</span>';
								html+= '<input checked="checked" class="radio" name="myAddress" type="radio" id="input-myAddress29651555">';
								html+= '<label class="address-info" for="input-myAddress29651555">';
								html+= '<b>'+data.consignee+'</b>';
								html+= '<span>'+data.address+'</span>';
								html+= '<span>收货人：'+data.consignee+'</span>';
								html+= '<span>电话：'+data.mobile+'</span>';
								html+= '</label></div>';
								
								$('.address-main').remove();
			                    $('#myAddress-29651555').append(html);
							}
						});
						
						
						$('#motaiAddress').hide();
						
				    });

				});
			</script>
			
</body>

</html>
